module TakeExamHelper
  ##
  # This method displays a radio-answer
  # @param answer is an instance of type Answer which will be displayed
	def display_radio(answer)
		name = "a_" + answer.question.id.to_s
		"<input type=\"checkbox\" name=\"#{name}[]\" value=\"#{answer.id}\" /> " \
		"#{ parse_images h answer.text} <br/>"
	end
  ##
  # This method displays a checkbox-answer
  # @param answer is an instance of type Answer which will be displayed
	def display_check(answer)
		name = "a_" + answer.question.id.to_s
		"<input type=\"radio\" name=\"#{name}[]\" value=\"#{answer.id}\" /> " \
		"#{ parse_images h answer.text }<br/>"
	end
end
